for j=1:length(ss)
 phiI(j)=ixx(j)-etaI/2*ixx(j)^2-deltaI;
 phiX(j)=xx(j)/ss(j)-etaX/2*xx(j)^2/ss(j)^2-deltaX;
end


ssmk1=ss;bsmk1=bs;phiImk1=phiI;phiXmk1=phiX;xmk1=xx;ixmk1=ixx; flagstarmk1=flagstar;

